//
//  WeiboAnnotation.m
//  WXWeibo
//
//  Created by apple on 16/5/23.
//  Copyright © 2016年 zic_magic. All rights reserved.
//

#import "WeiboAnnotation.h"

@implementation WeiboAnnotation

- (void)setWeibo:(WeiboModel *)weibo {
    
    _weibo = weibo;
    
    NSDictionary *geo = _weibo.geo;
    
    NSArray *geoArr = geo[@"coordinates"];
    
    if (geoArr.count == 2) {
        NSString *lat = [geoArr firstObject];
        NSString *lon = [geoArr lastObject];
        
        self.coordinate = CLLocationCoordinate2DMake([lat floatValue], [lon floatValue]);
    }
    
}

@end
